<template>
  <!-- 录音中的提示框 -->
  <div class="recording-indicator" :class="{ show: isRecording }">
    <div class="recording-wave">
      <div v-for="i in 5" :key="i" class="wave-bar" :style="{ animationDelay: (i - 1) * 0.1 + 's' }"></div>
    </div>
    <div>正在录音...</div>
  </div>
</template>

<script setup>
import { defineProps } from 'vue';
const props = defineProps({
  isRecording: Boolean
});
</script>
<style scoped>
/* 录音指示器 */
.recording-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 30px 40px;
  border: 1px solid var(--primary);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.recording-indicator.show {
  opacity: 1;
}

.recording-wave {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  margin-bottom: 15px;
}

.wave-bar {
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite;
}

.wave-bar:nth-child(2) {
  animation-delay: 0.1s;
}

.wave-bar:nth-child(3) {
  animation-delay: 0.2s;
}

.wave-bar:nth-child(4) {
  animation-delay: 0.3s;
}

.wave-bar:nth-child(5) {
  animation-delay: 0.4s;
}
</style>